package com.android.job.logic;

import android.os.Handler;

import com.android.job.fusion.FusionCode;
import com.android.job.service.Request;
import com.android.job.service.request.LoginRequest;

public class LoginLogic
{
 
	private static LoginLogic instance;
	
	private final static String URL = "http://192.168.10.221:8080/employment/protocol.do";
	
	private LoginLogic()
	{
		
	}
	
	public synchronized static LoginLogic getInstance()
	{
		if(instance == null)
		{
			instance = new LoginLogic();
		}
		return instance;
	}
	
	public Request login(Handler handler,String userName,String userPassword)
	{
		LoginRequest login = new LoginRequest(handler, FusionCode.URL);
		login.setValues(userName, userPassword);
		login.getJSONResponse();
		
		return login;
	}
	
}
